on 7/15/03, Florian Weimer <fw@deneb.enyo.de> wrote:
>If I switched from signed integers to unsigned integers (and from INET
>to "real" IPv4 addresses, consisting of the relevant 32 bits only) I
>think I could save about 25% of my table size.
Why do you need unsigned ints to hold IP addresses? Signed ints are also 32
bits wide and hold IPv4 addresses just fine. What difference does it make if IP
addresses with a class A higher than 127 appear as negative numbers?
Here's a couple of convenience function that convert between integer and dotted
notation. These functions work fine with the signed integers we have in
PostgreSQL.
<http://www.deepskytech.com/downloads/misc/ip_functions.txt>
--
Jim Crate
Deep Sky Technologies, Inc.